Inside Macintosh: Memory

Previous | Chapter Top | Chapter Contents | Next

Using Memory

This section describes how you can use the Memory Manager to perform the most typical memory management tasks. In particular, this section shows how you can

The techniques described in this section are designed to minimize fragmentation of your application heap and to ensure that your application always has sufficient memory to complete any essential operations. Many of these techniques incorporate the heap memory cushion and emergency memory reserve discussed in "Low-Memory Conditions," beginning on Low-Memory Conditions .

This section describes relatively simple memory-management techniques. Depending on the requirements of your application, you might want to manage your heap memory differently.

Setting Up the Application Heap

Determining the Amount of Free Memory

Allocating Blocks of Memory

Maintaining a Memory Reserve

Defining a Grow-Zone Function


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next